#include "Messages.h"
#include "../CEnemy.h"
#include "../CBullet.h"
#include "../CShip.h"
#include "../CBase.h"
#include "../CPowerUp.h"


CCreateEnemyLevelOneMessage::CCreateEnemyLevelOneMessage() : CBaseMessage(MSG_CREATE_ENEMY_LEVEL_ONE)
{
}

CCreateEnemyLevelTwoMessage::CCreateEnemyLevelTwoMessage() : CBaseMessage(MSG_CREATE_ENEMY_LEVEL_TWO)
{
}

CCreateEnemyLevelThreeMessage::CCreateEnemyLevelThreeMessage() : CBaseMessage(MSG_CREATE_ENEMY_LEVEL_THREE)
{
}

CCreateBulletMessage::CCreateBulletMessage(CBase *pBase) : CBaseMessage(MSG_CREATE_BULLET)
{
	m_pBase = pBase;
	pBase->AddRef();
}
CCreatePowerUpMessage::CCreatePowerUpMessage(CEnemy* pEnemy) : CBaseMessage(MSG_CREATE_POWERUP)
{
	m_pEnemy = pEnemy;
	pEnemy->AddRef();
}

CCreatePowerUpMessage::~CCreatePowerUpMessage()
{
	m_pEnemy->Release();
}

CDestroyPowerUpMessage::CDestroyPowerUpMessage(CPowerUp* pPowerUp) : CBaseMessage(MSG_DESTROY_POWERUP)
{
	m_pPowerUp = pPowerUp;
	pPowerUp->AddRef();
}

CDestroyPowerUpMessage::~CDestroyPowerUpMessage()
{
	m_pPowerUp->Release();
}

CCreateBulletMessage::~CCreateBulletMessage()
{
	m_pBase->Release();
}

CDestroyEnemyMessage::CDestroyEnemyMessage(CEnemy *pEnemy) : CBaseMessage(MSG_DESTROY_ENEMY)
{
	m_pEnemy = pEnemy;
	pEnemy->AddRef();
}

CDestroyEnemyMessage::~CDestroyEnemyMessage()
{
	m_pEnemy->Release();
}

CDestroyBulletMessage::CDestroyBulletMessage(CBullet *pBullet) : CBaseMessage(MSG_DESTROY_BULLET)
{
	m_pBullet = pBullet;
	pBullet->AddRef();
}

CDestroyBulletMessage::~CDestroyBulletMessage()
{
	m_pBullet->Release();
}

CCreatePlayerMessage::CCreatePlayerMessage() : CBaseMessage(MSG_CREATE_PLAYER)
{
}

CDestroyPlayerMessage::CDestroyPlayerMessage(CShip* pShip) : CBaseMessage(MSG_DESTROY_PLAYER)
{
	m_pShip = pShip;
	pShip->AddRef();
}

CDestroyPlayerMessage::~CDestroyPlayerMessage()
{
	m_pShip->Release();
}